import axios from "@/api/http";
import qs from 'qs'

const connect = (params: any = {}) => {
    return axios.post('/redis/connect', params)
}

const query = (params: any = {}) => {
    return axios.post('/redis/query', qs.stringify(params))
}

const disConnect = (params: any = {}) => {
    return axios.post('/redis/disConnect', qs.stringify(params))
}

const addKey = (params: any = {}) => {
    return axios.post('/redis/addKey', params)
}

const removeKey = (params: any = {}) => {
    return axios.post('/redis/removeKey', qs.stringify(params))
}
const hasKey = (params: any = {}) => {
    return axios.post('/redis/hasKey', qs.stringify(params))
}

export default {
    connect,
    query,
    disConnect,
    addKey,
    removeKey,
    hasKey

}